#include <Wire.h>
#include <APM_SRF.h>

APM_SRF sonar;

void setup()
{
  Serial.begin(57600);
 sonar.init(1);  // in case you need to init Wire
// sonar.init(0); // in case you don't need to init Wire
   delay(100); 
}

void loop()
{
sonar.fireSonar();
  delay(100);
 unsigned int rangeData = sonar.getRange();                     // Calls a function to get range
  Serial.println(rangeData,DEC);
}
